<template>
    <view class="content">
        <view class="box">
            <view class="title">基本信息</view>
            <view class="box-cen">
                <view class="ke-inp-item">
                    <view>楼盘名称</view>
                    <input type="text" v-model="floorName" placeholder="请输入楼盘名称" placeholder-class="p-inp" class="inp">
                </view>
                <view class="ke-inp-item">
                    <view>楼盘类型</view>
                    <view class="u-flex" @click="show_1 = true">
                        <input type="text" v-model="lpType" placeholder="请选择楼盘类型" placeholder-class="p-inp" class="inp" disabled>
                        <u-icon name="arrow-down-fill" size="24" color="#ababab" class="u-p-l-10"></u-icon>
                    </view>
                </view>
                <view class="ke-inp-item">
                    <view>项目类型</view>
                    <view class="u-flex" @click="show_2 = true">
                        <input type="text" v-model="project" placeholder="请选择项目类型" placeholder-class="p-inp" class="inp" disabled>
                        <u-icon name="arrow-down-fill" size="24" color="#ababab" class="u-p-l-10"></u-icon>
                    </view>
                </view>
                <view class="ke-inp-item">
                    <view>销售状态</view>
                    <view class="u-flex" @click="show_3 = true">
                        <input type="text" v-model="sale" placeholder="请选择销售状态" placeholder-class="p-inp" class="inp" disabled>
                        <u-icon name="arrow-down-fill" size="24" color="#ababab" class="u-p-l-10"></u-icon>
                    </view>
                </view>
                <view class="ke-inp-item">
                    <view>标签</view>
                    <view class="u-flex" @click="show_4 = true">
                        <input type="text" v-model="label" placeholder="请选择标签" placeholder-class="p-inp" class="inp" disabled>
                        <u-icon name="arrow-down-fill" size="24" color="#ababab" class="u-p-l-10"></u-icon>
                    </view>
                </view>
                <view class="ke-inp-item2">
                    <view class="u-p-t-30 u-p-b-30">楼盘位置</view>
                    <textarea v-model="address" placeholder="请选择楼盘位置" class="tit-t" :auto-height="true" disabled @click="chooseAddress"></textarea>
                </view>
                <view class="ke-inp-item">
                    <view>地区</view>
                    <view class="u-flex" @click="show_5 = true">
                        <input type="text" v-model="area" placeholder="请选择地区" placeholder-class="p-inp" class="inp" disabled>
                        <u-icon name="arrow-down-fill" size="24" color="#ababab" class="u-p-l-10"></u-icon>
                    </view>
                </view>
                <view class="ke-inp-item u-p-t-30 u-p-b-30">
                    <view>佣金类型</view>
                    <view class="pay-type">
                        <view class="u-flex u-p-r-50" @click="commissionType = 1">
                            <image :src="commissionType == 1 ? '../../static/icon/choose.png' : '../../static/icon/cancel.png'" class="choose-02"></image>
                            <view>佣金金额</view>
                        </view>
                        <view class="u-flex" @click="commissionType = 2">
                            <image :src="commissionType == 2 ? '../../static/icon/choose.png' : '../../static/icon/cancel.png'" class="choose-02"></image>
                            <view>佣金比例</view>
                        </view>
                    </view>
                </view>
                
                <!-- 对外 -->
                <view class="ke-inp-item">
                    <view>对外佣金金额</view>
                    <input type="text" v-model="commission" placeholder="请输入对外佣金" placeholder-class="p-inp" class="inp">
                    <text v-if="commissionType == 2">%</text>
                </view>
                <!-- 对内 commission_n  -->
                <view class="ke-inp-item">
                    <view>对内佣金金额</view>
                    <input type="text" v-model="commission_n" placeholder="请输入对内佣金" placeholder-class="p-inp" class="inp">
                    <text v-if="commissionType == 2">%</text>
                </view>
                
                <view class="ke-inp-item">
                    <view>结佣节点</view>
                    <input type="text" v-model="point" placeholder="请输入结佣节点" placeholder-class="p-inp" class="inp">
                </view>
                
                <view class="ke-inp-item u-p-t-30 u-p-b-30">
                    <view>是否有跳点</view>
                    <view class="pay-type">
                        <view class="u-flex u-p-r-50" @click="chooseCondition(1)">
                            <image :src="isCondition == 1 ? '../../static/icon/choose.png' : '../../static/icon/cancel.png'" class="choose-02"></image>
                            <view>是</view>
                        </view>
                        <view class="u-flex" @click="chooseCondition(2)">
                            <image :src="isCondition == 2 ? '../../static/icon/choose.png' : '../../static/icon/cancel.png'" class="choose-02"></image>
                            <view>否</view>
                        </view>
                    </view>
                </view>
                
                <view class="ke-inp-item">
                    <view>单价</view>
                    <input type="digit" v-model="price" placeholder="请输入单价金额" placeholder-class="p-inp" class="inp">
                </view>
                <view class="ke-inp-item">
                    <view>户型</view>
                    <input type="text" v-model="houseName" placeholder="请输入户型名称" placeholder-class="p-inp" class="inp">
                </view>
                <view class="ke-inp-item">
                    <view>建面</view>
                    <view class="u-flex">
                        <input type="digit" v-model="minArea" class="inp-jm">
                        -
                        <input type="digit" v-model="maxArea" class="inp-jm">
                        m²
                    </view>
                </view>
                <view class="ke-inp-item">
                    <view>开盘</view>
                    <input type="text" placeholder="请选择开盘时间" placeholder-class="p-inp" class="inp" disabled 
                        v-model="startTime" @click="KStimeShow = true">
                </view>
                <view class="ke-inp-item">
                    <view>交房</view>
                    <input type="text" placeholder="请选择交房时间" placeholder-class="p-inp" class="inp" disabled 
                        v-model="endTime" @click="JStimeShow = true">
                </view>
                <view class="remark">
                    <view>楼盘封面图</view>
                    <view class="img-box">
                        <view class="img-box-item" v-if="cover">
                            <image :src="cover" class="up-photo" @click="doPreview(cover)"></image>
                            <view class="del-img" @click="delImg('', 11)">删除</view>
                        </view>
                        <image src="/static/image/up_photo.png" class="up-photo" v-if="!cover" @click="chooseImg(1)"></image>
                    </view>
                </view>
                <view class="remark border-t">
                    <view>楼盘图片</view>
                    <view class="img-box">
                        <view class="img-box-item" v-for="(item, index) in imgs" :key="index" v-if="imgs && imgs.length > 0">
                            <image :src="item" class="up-img" @click="doPreview(item, index)"></image>
                            <view class="del-img" @click="delImg(index, 1)">删除</view>
                        </view>
                        <image src="/static/image/up_photo.png" class="up-img" v-if="imgs && imgs.length < 9" @click="chooseImg(2)"></image>
                    </view>
                </view>
                <view class="remark border-t">
                    <view>样板间图片</view>
                    <view class="img-box">
                        <view class="img-box-item" v-for="(item, index) in rooms" :key="index" v-if="rooms && rooms.length > 0">
                            <image :src="item" class="up-img" @click="doPreview(item, index)"></image>
                            <view class="del-img" @click="delImg(index, 5)">删除</view>
                        </view>
                        <image src="/static/image/up_photo.png" class="up-img" v-if="rooms && rooms.length < 9" @click="chooseImg(5)"></image>
                    </view>
                </view>
                <view class="remark border-t">
                    <view>楼盘视频</view>
                    <view class="img-box">
                        <view class="video-box-item" v-if="video">
                            <video id="myVideo" :src="video" :autoplay="false" controls
                                play-btn-position="center" style="width: 300px;height: 150px;"></video>
                            <view class="del-video" @click="delImg('', 66)">删除</view>
                        </view>
                        <image src="/static/image/up_video.png" class="up-photo" v-if="!video" @click="chooseVideo(6)"></image>
                    </view>
                </view>
            </view>
        </view>
        
        <view class="box u-p-b-10">
            <view class="title">
                <view>户型信息</view>
                <view class="add" @click="addHouse">
                    <text>+</text>添加户型
                </view>
            </view>
            <view class="box-cen" v-for="(item, index) in houseList" :key="index">
                <view class="ke-inp" @click="openHouse(item)">
                    <view>户型{{index + 1}}</view>
                    <view class="u-flex">
                        <image src="../../../static/icon/arrow_d_01.png" class="arrow-d-01"></image>
                        <image src="/static/icon/del.png" class="del-icon" @click.stop="delHouse(index)"></image>
                    </view>
                </view>
                <template v-if="item.show">
                    <view class="ke-inp-item">
                        <view>户型类型</view>
                        <view class="u-flex" @click="open(item, 6)">
                            <input type="text" v-model="item.type" placeholder="请选择户型类型" placeholder-class="p-inp" class="inp" disabled>
                            <u-icon name="arrow-down-fill" size="24" color="#ababab" class="u-p-l-10"></u-icon>
                        </view>
                    </view>
                    <view class="ke-inp-item">
                        <view>户型名称</view>
                        <input type="text" v-model="item.name" placeholder="请输入户型名称" placeholder-class="p-inp" class="inp">
                    </view>
                    <view class="ke-inp-item">
                        <view>面积</view>
                        <input type="text" v-model="item.house_area" placeholder="请输入面积" placeholder-class="p-inp" class="inp">
                    </view>
                    <view class="ke-inp-item">
                        <view>售价</view>
                        <input type="text" v-model="item.price" placeholder="请输入售价金额" placeholder-class="p-inp" class="inp">
                    </view>
                    <view class="ke-inp-item">
                        <view>朝向</view>
                        <view class="u-flex" @click="open(item, 10)">
                            <input type="text" v-model="item.toward" placeholder="请选择户型朝向" placeholder-class="p-inp" class="inp" disabled>
                            <u-icon name="arrow-down-fill" size="24" color="#ababab" class="u-p-l-10"></u-icon>
                        </view>
                    </view>
                    <view class="ke-inp-item">
                        <view>装修</view>
                        <view class="u-flex" @click="open(item, 11)">
                            <input type="text" v-model="item.renovation" placeholder="请选择户型朝向" placeholder-class="p-inp" class="inp" disabled>
                            <u-icon name="arrow-down-fill" size="24" color="#ababab" class="u-p-l-10"></u-icon>
                        </view>
                    </view>
                    <view class="ke-inp-item">
                        <view>户型分布</view>
                        <view class="u-flex" @click="open(item, 12)">
                            <input type="text" v-model="item.distribution" placeholder="请选择户型朝向" placeholder-class="p-inp" class="inp" disabled>
                            <u-icon name="arrow-down-fill" size="24" color="#ababab" class="u-p-l-10"></u-icon>
                        </view>
                    </view>
                    <view class="ke-inp-item">
                        <view>楼层类型</view>
                        <view class="u-flex" @click="open(item, 13)">
                            <input type="text" v-model="item.floor" placeholder="请选择户型朝向" placeholder-class="p-inp" class="inp" disabled>
                            <u-icon name="arrow-down-fill" size="24" color="#ababab" class="u-p-l-10"></u-icon>
                        </view>
                    </view>
                    <view class="remark">
                        <view>户型封面图</view>
                        <view class="img-box">
                            <view class="img-box-item" v-if="item.image">
                                <image :src="item.image" class="up-photo" @click="doPreview(item.image)"></image>
                                <view class="del-img" @click="delImg('', 22, item)">删除</view>
                            </view>
                            <image src="/static/image/up_photo.png" class="up-photo" v-if="!item.image" @click="chooseImg(3, item)"></image>
                        </view>
                    </view>
                    <view class="remark border-t">
                        <view>户型图片</view>
                        <view class="img-box">
                            <view class="img-box-item" v-for="(el, ind) in item.hImgs" :key="ind" v-if="item && item.hImgs && item.hImgs.length > 0">
                                <image :src="el" class="up-img" @click="doPreview(el, ind)"></image>
                                <view class="del-img" @click="delImg(ind, 2, item)">删除</view>
                            </view>
                            <image src="/static/image/up_photo.png" class="up-img" v-if="item && item.hImgs && item.hImgs.length < 9" @click="chooseImg(4, item)"></image>
                        </view>
                    </view>
                    
                    <view class="remark border-t">
                        <view>户型样板间图片</view>
                        <view class="img-box">
                            <view class="img-box-item" v-for="(el, ind) in item.hRoomImgs" :key="ind" v-if="item && item.hRoomImgs && item.hRoomImgs.length > 0">
                                <image :src="el" class="up-img" @click="doPreview(el, ind)"></image>
                                <view class="del-img" @click="delImg(ind, 7, item)">删除</view>
                            </view>
                            <image src="/static/image/up_photo.png" class="up-img" v-if="item && item.hRoomImgs && item.hRoomImgs.length < 9" @click="chooseImg(7, item)"></image>
                        </view>
                    </view>
                    <view class="remark border-t">
                        <view>户型视频</view>
                        <view class="img-box">
                            <view class="video-box-item" v-if="item.video">
                                <video id="myVideo" :src="item.video" :autoplay="false" controls
                                    play-btn-position="center" style="width: 300px;height: 150px;"></video>
                                <view class="del-video" @click="delImg('', 88, item)">删除</view>
                            </view>
                            <image src="/static/image/up_video.png" class="up-photo" v-if="!item.video" @click="chooseVideo(8, item)"></image>
                        </view>
                    </view>
                </template>
            </view>
        </view>
        
        <view class="box u-p-b-10">
            <view class="title">
                <view>佣金方案</view>
                <view class="add" @click="addPlan">
                    <text>+</text>添加方案
                </view>
            </view>
            <view class="box-cen" v-for="(item, index) in yjList" :key="index">
                <view class="ke-inp" @click="openPlan(item)">
                    <view>方案{{index+1}}</view>
                    <view class="u-flex">
                        <image src="../../../static/icon/arrow_d_01.png" class="arrow-d-01"></image>
                        <image src="/static/icon/del.png" class="del-icon" @click.stop="delPlan(index)"></image>
                    </view>
                </view>
                <template v-if="item.show">
                    <view class="ke-inp-item">
                        <view>佣金类别</view>
                        <view class="u-flex" @click="open(item, 7)">
                            <input type="text" v-model="item.type" placeholder="请选择佣金类别" placeholder-class="p-inp" class="inp" disabled>
                            <u-icon name="arrow-down-fill" size="24" color="#ababab" class="u-p-l-10"></u-icon>
                        </view>
                    </view>
                    <view class="ke-inp-item">
                        <view>方案名称</view>
                        <input type="text" v-model="item.name" placeholder="请输入方案名称" placeholder-class="p-inp" class="inp">
                    </view>
                    <view class="ke-inp-item u-p-t-30 u-p-b-30">
                        <view>计算类型</view>
                        <view class="pay-type">
                            <view class="u-flex u-p-r-50" @click.stop="chooseProjectType(item, 1)">
                                <image :src="item.count_type == 1 ? '../../static/icon/choose.png' : '../../static/icon/cancel.png'" class="choose-02"></image>
                                <view>面积</view>
                            </view>
                            <view class="u-flex u-p-r-50" @click.stop="chooseProjectType(item, 2)">
                                <image :src="item.count_type == 2 ? '../../static/icon/choose.png' : '../../static/icon/cancel.png'" class="choose-02"></image>
                                <view>户型</view>
                            </view>
                            <view class="u-flex" @click.stop="chooseProjectType(item, 3)">
                                <image :src="item.count_type == 3 ? '../../static/icon/choose.png' : '../../static/icon/cancel.png'" class="choose-02"></image>
                                <view>项目类型</view>
                            </view>
                        </view>
                    </view>
                    <view class="ke-inp-item" v-if="item.count_type == 1">
                        <view>面积</view>
                        <view class="u-flex">
                            <input type="number" v-model="item.start_area" class="inp-jm">
                            -
                            <input type="number" v-model="item.end_area" class="inp-jm">
                            ㎡
                        </view>
                    </view>
                    <view class="ke-inp-item" v-if="item.count_type == 2">
                        <view>户型</view>
                        <view class="u-flex" @click="open(item, 8)">
                            <input type="text" v-model="item.dict" placeholder="请选择户型" placeholder-class="p-inp" class="inp" disabled>
                            <u-icon name="arrow-down-fill" size="24" color="#ababab" class="u-p-l-10"></u-icon>
                        </view>
                    </view>
                    <view class="ke-inp-item" v-if="item.count_type == 3">
                        <view>项目类型</view>
                        <view class="u-flex" @click="open(item, 9)">
                            <input type="text" v-model="item.dict" placeholder="请选择类型" placeholder-class="p-inp" class="inp" disabled>
                            <u-icon name="arrow-down-fill" size="24" color="#ababab" class="u-p-l-10"></u-icon>
                        </view>
                    </view>
                    
                    <view class="ke-inp-item u-p-t-30 u-p-b-30">
                        <view>佣金类型</view>
                        <view class="pay-type">
                            <view class="u-flex u-p-r-50" @click.stop="choosePlanComType(item, 1)">
                                <image :src="item.rules_type == 1 ? '../../static/icon/choose.png' : '../../static/icon/cancel.png'" class="choose-02"></image>
                                <view>佣金金额</view>
                            </view>
                            <view class="u-flex" @click.stop="choosePlanComType(item, 2)">
                                <image :src="item.rules_type == 2 ? '../../static/icon/choose.png' : '../../static/icon/cancel.png'" class="choose-02"></image>
                                <view>佣金比例</view>
                            </view>
                        </view>
                    </view>
                    
                    <!-- 对外 -->
                    <view class="ke-inp-item">
                        <view>对外计算规则</view>
                        <view class="u-flex">
                            <input type="digit" v-model="item.rules" placeholder="请输入对外计算规则" placeholder-class="p-inp" class="inp">
                            <text class="u-p-l-10" v-if="item.rules_type == 1">元/套</text>
                            <text class="u-p-l-10" v-if="item.rules_type == 2">%</text>
                        </view>
                    </view>
                    <!-- 对内 rules_n -->
                    <view class="ke-inp-item">
                        <view>对内计算规则</view>
                        <view class="u-flex">
                            <input type="digit" v-model="item.rules_n" placeholder="请输入对内计算规则" placeholder-class="p-inp" class="inp">
                            <text class="u-p-l-10" v-if="item.rules_type == 1">元/套</text>
                            <text class="u-p-l-10" v-if="item.rules_type == 2">%</text>
                        </view>
                    </view>
                    
                    <view class="jump-box" v-if="isCondition == 1">
                        <view class="jump-title">跳点条件</view>
                        <view v-for="(el, ind) in item.condition" :key="ind">
                            <view class="jump-item">
                                <view class="ke-inp-item">
                                    <view>跳点条件</view>
                                    <view class="u-flex">
                                        <input type="number" v-model="el.start_condition" class="inp-td">
                                        -
                                        <input type="number" v-model="el.end_condition" class="inp-td">
                                        套
                                    </view>
                                </view>
                                
                                <!-- 对外 -->
                                <view class="ke-inp-item">
                                    <view>对外跳点规则</view>
                                    <view class="u-flex">
                                        <input type="digit" v-model="el.condition_rules" placeholder="请输入对外跳点规则" placeholder-class="p-inp" class="inp-td-rule">
                                        <text class="u-p-l-10" v-if="item.rules_type == 1">元/套</text>
                                        <text class="u-p-l-10" v-if="item.rules_type == 2">%</text>
                                    </view>
                                </view>
                                <!-- 对内 condition_rules_n -->
                                <view class="ke-inp-item">
                                    <view>对内跳点规则</view>
                                    <view class="u-flex">
                                        <input type="digit" v-model="el.condition_rules_n" placeholder="请输入对内跳点规则" placeholder-class="p-inp" class="inp-td-rule">
                                        <text class="u-p-l-10" v-if="item.rules_type == 1">元/套</text>
                                        <text class="u-p-l-10" v-if="item.rules_type == 2">%</text>
                                    </view>
                                </view>
                            </view>
                            <view class="jump-btns">
                                <view class="jump-btn-l" v-if="ind == item.condition.length - 1" @click="addJump(item)">
                                    <text>+</text>添加跳点条件
                                </view>
                                <view class="jump-btn-r" v-if="item.condition.length != 1" @click="delJump(item, ind)">删除</view>
                            </view>
                        </view>
                    </view>
                    
                    <view class="ke-inp-item">
                        <view>生效日期</view>
                        <input type="text" placeholder="请选择生效日期" placeholder-class="p-inp" class="inp" disabled
                            v-model="item.start_time" @click="openTimeShow(item, 1)">
                    </view>
                    <view class="ke-inp-item">
                        <view>截止日期</view>
                        <input type="text" placeholder="请选择截止日期" placeholder-class="p-inp" class="inp" disabled
                            v-model="item.end_time" @click="openTimeShow(item, 2)">
                    </view>
                </template>
            </view>
        </view>
        
        <view class="box">
            <view class="title">合作平台</view>
            <view class="ke-inp-item u-p-l-20 u-p-r-20">
                <view>合作平台</view>
                <view class="u-flex" @click="show_8 = true">
                    <input type="text" v-model="platform" placeholder="请选择合作平台" placeholder-class="p-inp" class="inp" disabled>
                    <u-icon name="arrow-down-fill" size="24" color="#ababab" class="u-p-l-10"></u-icon>
                </view>
            </view>
        </view>
        
        <view class="box">
            <view class="title">合作规则</view>
            <view class="u-p-20">
                <textarea v-model="rule" placeholder="请输入规则" placeholder-class="p-inp" maxlength="-1" class="rule-text"></textarea>
            </view>
        </view>
        
        <view class="box">
            <view class="title">
                <view>周边楼盘推荐</view>
                <view class="add" @click="$gTo('/pages/index/floor-list?from=1')">
                    <text>+</text>添加楼盘
                </view>
            </view>
            <view class="box-cen u-p-t-20">
                <view class="item" v-for="(item, index) in list" :key="index" @click="$gTo('../floor/floor-details?id='+ item.id)">
                    <image :src="item.image" class="del-09"></image>
                    <view>
                        <view class="u-flex u-row-between u-col-center">
                            <view>
                                <view class="name">{{item.name}}</view>
                                <view class="area">{{item.region_name}} · {{item.unit_price}}元/m²</view>
                            </view>
                            <image src="/static/icon/del.png" class="del-icon" @click.stop="delFloor(index)"></image>
                        </view>
                        <view class="price">
                            <view>
                                <text class="p-l">{{item.commission_price}}</text>
                                <!-- <text class="p-l-r">万元</text> -->
                                <text>/套佣金</text>
                            </view>
                            <view class="plan">{{item.commission_num}}个方案</view>
                        </view>
                    </view>
                </view>
            </view>
        </view>
        
        <view class="btn" @click="$noMultipleClicks(doSubmit)">立即修改</view>
        
        <!-- 楼盘类型 -->
        <u-select v-model="show_1" mode="single-column" :list="screen.pro_type" value-name="id" label-name="name" @confirm="confirmMore($event, 1)"></u-select>
        <!-- 项目类型 -->
        <u-select v-model="show_2" mode="single-column" :list="screen.project" value-name="id" label-name="name" @confirm="confirmMore($event, 2)"></u-select>
        <!-- 销售状态 -->
        <u-select v-model="show_3" mode="single-column" :list="screen.sale" value-name="id" label-name="name" @confirm="confirmMore($event, 3)"></u-select>
        <!-- 地区 -->
        <u-select v-model="show_5" mode="single-column" :list="screen.region" value-name="region_id" label-name="region_name" @confirm="confirmMore($event, 5)"></u-select>
        <!-- 户型类型 -->
        <u-select v-model="show_6" mode="single-column" :list="screen.house_type" value-name="id" label-name="name" @confirm="confirmMore($event, 6)"></u-select>
        <!-- 佣金类别 -->
        <u-select v-model="show_7" mode="single-column" :list="screen.commission" value-name="id" label-name="name" @confirm="confirmMore($event, 7)"></u-select>
        
        <!-- 合作平台 -->
        <u-select v-model="show_8" mode="single-column" :list="screen.platform" value-name="id" label-name="name" @confirm="confirmMore($event, 8)"></u-select>
        
        <!-- 佣金方案 户型 -->
        <u-select v-model="show_9" mode="single-column" :list="screen.house_type" value-name="id" label-name="name" @confirm="confirmMore($event, 9)"></u-select>
        <!-- 佣金方案 项目类型 -->
        <u-select v-model="show_10" mode="single-column" :list="screen.project" value-name="id" label-name="name" @confirm="confirmMore($event, 10)"></u-select>
        
        <!-- 户型信息-朝向 -->
        <u-select v-model="show_11" mode="single-column" :list="screen.toward" value-name="id" label-name="name" @confirm="confirmMore($event, 11)"></u-select>
        <!-- 户型信息-装修 -->
        <u-select v-model="show_12" mode="single-column" :list="screen.renovation" value-name="id" label-name="name" @confirm="confirmMore($event, 12)"></u-select>
        <!-- 户型信息-户型分布 -->
        <u-select v-model="show_13" mode="single-column" :list="screen.distribution" value-name="id" label-name="name" @confirm="confirmMore($event, 13)"></u-select>
        <!-- 户型信息-楼层类型 -->
        <u-select v-model="show_14" mode="single-column" :list="screen.floor" value-name="id" label-name="name" @confirm="confirmMore($event, 14)"></u-select>
        
        <!-- 标签多选 -->
        <u-popup mode="bottom" v-model="show_4">
            <view class="popup">
                <scroll-view scroll-y="true" style="height: 500rpx;">
                    <view>
                        <view class="popup-item" v-for="(item, index) in screen.label" :key="index"
                            :class="{active : item.isSelect}" @click="choose(item)">
                            {{item.name}}
                        </view>
                    </view>
                </scroll-view>
                <view class="pop-btn" @click="confirmStore">确定</view>
            </view>
        </u-popup>
        <!-- 选择时间:开盘、交房、生效、截止 -->
        <u-picker v-model="KStimeShow" mode="time" :params="timeParams" @confirm="chooseTime(1, $event)"></u-picker>
        <u-picker v-model="JStimeShow" mode="time" :params="timeParams" @confirm="chooseTime(2, $event)"></u-picker>
        <u-picker v-model="SXtimeShow" mode="time" :params="timeParams" @confirm="chooseTime(3, $event)"></u-picker>
        <u-picker v-model="JZtimeShow" mode="time" :params="timeParams" @confirm="chooseTime(4, $event)"></u-picker>
    </view>
</template>

<script>
    import { API_URL } from '@/static/js/common.js';
    export default {
        data() {
            return {
                noClick:true,//连点
                URL: API_URL, //上传图片用的
                show_1: false,//楼盘类型
                show_2: false,//项目类型
                show_3: false,//销售状态
                show_4: false,//标签
                show_5: false,//地区
                show_6: false,//户型类型
                show_7: false,//佣金类别
                show_8: false,//合作平台
                show_9: false,//佣金方案--户型
                show_10: false,//佣金方案--项目类型
                show_11: false,//户型信息--朝向
                show_12: false,//户型信息--装修
                show_13: false,//户型信息--户型分布
                show_14: false,//户型信息--楼层类型
                floorName: '',//楼盘名称
                lpType: '',//楼盘类型
                lpTypeId: '',
                project: '',//项目类型
                projectId: '',
                sale: '',//销售状态
                saleId: '',
                label: '',//标签
                labelId: '',
                address: '',//楼盘位置
                area: '',//地区
                areaId: '',
                commissionType: 1,//佣金类型
                commission: '',//对外佣金
                commission_n: '',//对内佣金
                point: '',//结佣节点
                isCondition: 1,//跳点 1是 2否
                price: '',//单价
                houseName: '',//户型
                minArea: '',//最小建面
                maxArea: '',//最大建面
                KStimeShow: false, //开盘时间
                startTime: '',
                JStimeShow: false, //交房时间
                endTime: '',
                cover: '',//楼盘封面图
                coverId: '',
                imgs: [],//楼盘图片
                imgsId: [],
                rooms: [],//样板间图片
                roomsId: [],
                video: '',//楼盘视频
                videoId: '',
                houseList: [],
                yjList: [],
                SXtimeShow: false, //生效日期
                JZtimeShow: false, //截止日期
                rule: '',//合作规则
                platform: '',//合作平台
                platformId: '',
                disabled: false,
                timeParams: { //时间格式
                	year: true,
                	month: true,
                	day: true,
                	hour: false,
                	minute: false,
                	second: false
                },
                id: '',//楼盘id
                data: {},//详情
                screen: {},//下拉选项
                obj: {},
                list: [],//周边楼盘列表
                latitude: '',
                longitude: '',
            };
        },
        onLoad(option) {
            this.id = option.id
            this.getData()
            this.getScreen() //获取下拉选项
            
            // 接收 添加周边楼盘监听
            uni.$on('CHOOSE_FLOOR', data => {
                // console.log('data',data)
                if (this.list.length == 0) {
                    this.list = data
                } else {
                    var arr = data
                    this.list.forEach((cur, index) => {
                        arr.forEach((el, eli) => {
                            if (cur.id == el.id) {
                                arr.splice(eli, 1)
                            }
                        })
                    })
                    this.list = [...this.list, ...arr]
                }
                // console.log('this.list',this.list)
            })
        },
        methods: {
            // 立即修改
            doSubmit() {
                if (!this.floorName) {
                    this.$toast('请输入楼盘名称')
                    return
                }
                if (!this.lpTypeId) {
                    this.$toast('请选择楼盘类型')
                    return
                }
                if (!this.projectId) {
                    this.$toast('请选择项目类型')
                    return
                }
                if (!this.saleId) {
                    this.$toast('请选择销售状态')
                    return
                }
                if (!this.labelId) {
                    this.$toast('请选择标签')
                    return
                }
                if (!this.address) {
                    this.$toast('请选择楼盘位置')
                    return
                }
                if (!this.areaId) {
                    this.$toast('请选择地区')
                    return
                }
                // if (!this.commission) {
                //     this.$toast('请输入对外佣金')
                //     return
                // }
                // if (!this.commission_n) {
                //     this.$toast('请输入对内佣金')
                //     return
                // }
                if (!this.point) {
                    this.$toast('请输入结佣节点')
                    return
                }
                if (!this.price) {
                    this.$toast('请输入单价')
                    return
                }
                if (!this.houseName) {
                    this.$toast('请输入户型')
                    return
                }
                if (!this.minArea) {
                    this.$toast('请输入最小建面')
                    return
                }
                if (!this.maxArea) {
                    this.$toast('请输入最大建面')
                    return
                }
                if (!this.startTime) {
                    this.$toast('请选择开盘时间')
                    return
                }
                if (!this.endTime) {
                    this.$toast('请选择交房时间')
                    return
                }
                if (!this.coverId) {
                    this.$toast('请上传楼盘封面图')
                    return
                }
                if (this.imgsId.length == 0) {
                    this.$toast('请上传楼盘图片')
                    return
                }
                
                //判断如果点击添加后 没有输入信息 提示
                // 户型信息
                let isNull = false
                if (this.houseList.length <= 0) {
                    this.$toast('请添加户型信息');
                    return false;
                }
                this.houseList.forEach(el => {
                    if (!el.type_id || !el.name || !el.house_area || !el.price || !el.toward_id || !el.renovation_id || !el.distribution_id || !el.floor_id || !el.image_id || el.hImgsId.length == 0) {
                        isNull = true;
                    }
                });
                if (isNull) {
                    this.$toast('请将户型信息填写完整');
                    return false;
                }
                
                // 佣金方案
                let isNullPlan = false
                if (this.yjList.length <= 0) {
                    this.$toast('请添加佣金方案');
                    return false;
                }
                this.yjList.forEach(el => {
                    if (!el.type_id || !el.name || !el.rules || !el.rules_n || !el.start_time || !el.end_time) {
                        isNullPlan = true;
                    }
                    if (el.count_type == 1) {
                        if (!el.start_area || !el.end_area) {
                            isNullPlan = true;
                        }
                    }
                    if (el.count_type == 2 || el.count_type == 3) {
                        if (!el.dict_id) {
                            isNullPlan = true;
                        }
                    }
                    if (this.isCondition == 1) {
                        // 有跳点
                        el.condition.forEach(item => {
                            if (!item.start_condition || !item.end_condition || !item.condition_rules || !item.condition_rules_n) {
                                isNullPlan = true;
                            }
                        })
                    }
                });
                if (isNullPlan) {
                    this.$toast('请将佣金方案填写完整');
                    return false;
                }
                
                if (!this.platformId) {
                    this.$toast('请选择合作平台')
                    return
                }
                if (!this.rule) {
                    this.$toast('请输入合作规则')
                    return
                }
                var ids = [],
                    houseList = [],
                    yjList = [];
                if (this.list.length > 0) {
                    this.list.forEach(cur => {
                        ids.push(cur.id)
                    })
                }
                if (this.houseList.length > 0) {
                    this.houseList.forEach(cur => {
                        houseList.push({
                            "id": cur.id || '',
                            "type_id": cur.type_id,
                            "name": cur.name,
                            "price": cur.price,
                            "toward_id": cur.toward_id,
                            "renovation_id": cur.renovation_id,
                            "distribution_id": cur.distribution_id,
                            "floor_id": cur.floor_id,
                            "house_area": cur.house_area,
                            "image_ids": cur.hImgsId.join(','),
                            "image_id": cur.image_id,
                            "video_id": cur.video_id,
                            "img_ids": cur.hRoomImgsId.join(','),
                        })
                    })
                }
                
                if (this.yjList.length > 0) {
                    this.yjList.forEach(cur => {
                        yjList.push({
                            "id": cur.id || '',
                            "type_id": cur.type_id,
                            "name": cur.name,
                            "start_time": cur.start_time,
                            "end_time": cur.end_time,
                            "rules_type": cur.rules_type,
                            "rules": cur.rules,
                            "rules_n": cur.rules_n,
                            "count_type": cur.count_type,
                            "start_area": cur.start_area,
                            "end_area": cur.end_area,
                            "dict_id": cur.dict_id,
                            "condition_data": cur.condition,
                        })
                    })
                }
                
                this.$ajax('update_properties', {
                    user_token: this.$getSync('userToken'),
                    id: this.id,//楼盘id
                    name: this.floorName,//楼盘名称
                    address: this.address,//地图地址
                    longitude: this.longitude,//经度
                    latitude: this.latitude,//纬度
                    house_type: this.houseName,//户型
                    unit_price: this.price,//单价
                    start_area: this.minArea,//起始面积
                    end_area: this.maxArea,//结束面积
                    region_id: this.areaId,//地区id
                    open_date: this.startTime,//开盘时间
                    delivery_date: this.endTime,//交房时间
                    commission_type: this.commissionType,//佣金类型 1佣金金额 2佣金比例
                    commission: this.commission,//对外佣金
                    commission_n: this.commission_n,//对内佣金
                    node: this.point,//结佣节点
                    image_id: this.coverId,//封面图id
                    images: this.imgsId.join(','),//轮播图id，分割字符串
                    rules: this.rule,//合作规则
                    periphery: ids.join(','),//周边楼盘id，分割字符串
                    be_similar: '',//相似楼盘id，分割字符串
                    pro_type_id: this.lpTypeId,//楼盘类型id
                    project_id: this.projectId,//项目类型id
                    sale_id: this.saleId,//销售状态id
                    label_ids: this.labelId,//标签id，分割字符串
                    house_data: houseList,//户型信息 数组
                    commission_data: yjList,//佣金方案 数组
                    platform_id: this.platformId,//合作平台
                    video_id: this.videoId,//基本信息--视频
                    img_ids: this.roomsId.join(',') || '',//基本信息--样板间图片
                    is_condition: this.isCondition,//是否跳点 1是 2否
                }).then(ret => {
                    if (ret.success == 1000) {
                        this.$toast('提交成功');
                        setTimeout(() => {
                            this.$backT()
                        }, 500)
                    } else {
                        this.$toast(ret.msg);
                    }
                });
            },
            
            // 获取楼盘详情
            getData() {
                this.$ajax('properties_detail', {
                    user_token: this.$getSync('userToken'),
                    id: this.id,//楼盘id
                }).then(ret => {
                    if (ret.success == 1000) {
                        this.latitude = ret.detail.latitude
                        this.longitude = ret.detail.longitude
                        this.floorName = ret.detail.name //楼盘名称
                        this.lpType = ret.detail.pro_type //楼盘类型
                        this.lpTypeId = ret.detail.pro_type_id 
                        this.project = ret.detail.project //项目类型
                        this.projectId = ret.detail.project_id 
                        this.sale = ret.detail.sale //销售状态
                        this.saleId = ret.detail.sale_id 
                        this.label = ret.detail.labels //标签
                        this.labelId = ret.detail.label_ids 
                        this.address = ret.detail.address //楼盘位置
                        this.area = ret.detail.region//地区
                        this.areaId = ret.detail.region_id
                        this.commissionType = ret.detail.commission_type//佣金类型
                        this.commission = ret.detail.commission//对外佣金
                        this.commission_n = ret.detail.commission_n //对内佣金
                        this.point = ret.detail.node//结佣节点
                        this.price = ret.detail.unit_price//单价
                        this.houseName = ret.detail.house_type//户型
                        this.minArea = ret.detail.start_area//最小建面
                        this.maxArea = ret.detail.end_area//最大建面
                        this.startTime = ret.detail.open_date //开盘时间
                        this.endTime = ret.detail.delivery_date //交房时间
                        this.cover = ret.detail.image//楼盘封面图
                        this.coverId = ret.detail.image_id
                        this.isCondition = ret.detail.is_condition //是否跳点
                        //楼盘图片
                        if (ret.detail && ret.detail.images && ret.detail.images.length > 0) {
                            ret.detail.images.forEach(cur => {
                                this.imgs.push(cur.image)
                                this.imgsId.push(cur.id)
                            })
                        }
                        // 基础信息--样板间图片
                        if (ret.detail && ret.detail.imgs && ret.detail.imgs.length > 0) {
                            ret.detail.imgs.forEach(cur => {
                                this.rooms.push(cur.image)
                                this.roomsId.push(cur.id)
                            })
                        }
                        // 基础信息--楼盘视频
                        if (ret.detail && ret.detail.video_id) {
                            this.video = ret.detail.video
                            this.videoId = ret.detail.video_id
                        }
                        // 户型
                        this.houseList = ret.detail.house_type_list
                        //户型图片
                        if (ret.detail && ret.detail.house_type_list && ret.detail.house_type_list.length > 0) {
                            ret.detail.house_type_list.forEach(cur => {
                                this.$set(cur, 'show', true)
                                this.$set(cur, 'hImgs', [])
                                this.$set(cur, 'hImgsId', [])
                                this.$set(cur, 'hRoomImgs', [])
                                this.$set(cur, 'hRoomImgsId', [])
                                cur.images.forEach(el => {
                                    cur.hImgs.push(el.image)
                                    cur.hImgsId.push(el.id)
                                })
                                if (cur.imgs && cur.imgs.length > 0) {
                                    cur.imgs.forEach(el => {
                                        cur.hRoomImgs.push(el.image)
                                        cur.hRoomImgsId.push(el.id)
                                    })
                                }
                            })
                        }
                        
                        // 佣金方案
                        this.yjList = ret.detail.commission_plan
                        if (ret.detail && ret.detail.commission_plan && ret.detail.commission_plan.length > 0) {
                            ret.detail.commission_plan.forEach(cur => {
                                this.$set(cur, 'show', true)
                            })
                        }
                        // console.log(this.houseList,this.yjList)
                        this.platform = ret.detail.platform //合作平台
                        this.platformId = ret.detail.platform_id
                        this.rule = ret.detail.rules_up
                        this.list = ret.detail.periphery //周边楼盘
                    } else {
                        this.$toast(ret.msg);
                    }
                });
            },
            
            // 选择楼盘位置
            chooseAddress() {
                const _this = this;
                uni.chooseLocation({
                    success: function (res) {
                        console.log('选择定位', res)
                        _this.longitude = res.longitude.toFixed(6);
                        _this.latitude = res.latitude.toFixed(6);
                        _this.address = res.address
                    }
                });
            },
            // 删除周边楼盘推荐
            delFloor(index) {
                this.list.splice(index, 1)
            },
            confirmMore(e, num) {
                console.log(e)
                if (num == 1) {
                    this.lpType = e[0].label
                    this.lpTypeId = e[0].value
                } else if (num == 2) {
                    this.project = e[0].label
                    this.projectId = e[0].value
                } else if (num == 3) {
                    this.sale = e[0].label
                    this.saleId = e[0].value
                } else if (num == 5) {
                    this.area = e[0].label
                    this.areaId = e[0].value
                } else if (num == 6) {
                    this.obj.type = e[0].label
                    this.obj.type_id = e[0].value
                } else if (num == 7) {
                    this.obj.type = e[0].label
                    this.obj.type_id = e[0].value
                } else if (num == 8) {
                    this.platform = e[0].label
                    this.platformId = e[0].value
                } else if (num == 9) {
                    this.obj.dict = e[0].label
                    this.obj.dict_id = e[0].value
                } else if (num == 10) {
                    this.obj.dict = e[0].label
                    this.obj.dict_id = e[0].value
                } else if (num == 11) {
                    this.obj.toward = e[0].label
                    this.obj.toward_id = e[0].value
                } else if (num == 12) {
                    this.obj.renovation = e[0].label
                    this.obj.renovation_id = e[0].value
                } else if (num == 13) {
                    this.obj.distribution = e[0].label
                    this.obj.distribution_id = e[0].value
                } else if (num == 14) {
                    this.obj.floor = e[0].label
                    this.obj.floor_id = e[0].value
                }
            },
            // 打开佣金方案中 选择日期
            openTimeShow(item, num) {
                this.obj = item
                if (num == 1) this.SXtimeShow = true
                if (num == 2) this.JZtimeShow = true
            },
            // 选择佣金方案中 佣金类型
            choosePlanComType(item, num) {
                item.rules_type = num
            },
            
            // 选择佣金方案中 项目类型
            chooseProjectType(item, num) {
                item.count_type = num
            },
            
            // 展开、收起户型
            openHouse(item) {
                item.show = !item.show
            },
            // 删除户型
            delHouse(index) {
                this.houseList.splice(index, 1)
            },
            // 添加户型
            addHouse() {
                this.houseList.push({
                    show: true,
                    type: '',//户型类型
                    type_id: '',
                    name: '',//户型名称
                    house_area: '',//面积
                    price: '',//售价
                    toward: '',//朝向
                    toward_id: '',
                    renovation: '',//装修
                    renovation_id: '',
                    distribution: '',//户型分布
                    distribution_id: '',
                    floor: '',//楼层类型
                    floor_id: '',
                    image: '',//户型封面图
                    image_id: '',
                    hImgs: [],//户型图
                    hImgsId: [],
                    
                    hRoomImgs: [], //样板间
                    hRoomImgsId: [],
                    video: '',//视频
                    video_id: '',//视频
                })
            },
            // 展开、收起方案
            openPlan(item) {
                item.show = !item.show
            },
            // 删除方案
            delPlan(index) {
                this.yjList.splice(index, 1)
            },
            // 选择是否跳点
            chooseCondition(num) {
                this.isCondition = num
                if (this.isCondition == 1) {
                    this.yjList.forEach(cur => {
                        if (cur.condition && cur.condition.length == 0) {
                            cur.condition = [{
                                start_condition: '',//跳点条件
                                end_condition: '',//
                                condition_rules: '',//对外跳点规则
                                condition_rules_n: '',//对内跳点规则
                            }]
                        }
                    })
                }
                if (this.isCondition == 2) {
                    this.yjList.forEach(cur => {
                        cur.condition = []
                    })
                }
                console.log('chooseCondition', this.yjList)
            },
            
            // 添加佣金方案
            addPlan() {
                this.yjList.push({
                    show: true,
                    type: '',//佣金类别
                    type_id: '',
                    name: '',//方案名称
                    rules_type: 1,//佣金类型
                    rules: '',//对外计算规则
                    rules_n: '',//对内计算规则
                    start_time: '', 
                    end_time: '',
                    count_type: 1, //1面积 2户型 3类型
                    start_area: '',//1面积
                    end_area: '',
                    dict: '',//2户型 3类型
                    dict_id: '',
                    condition: [{
                        start_condition: '',//跳点条件
                        end_condition: '',//
                        condition_rules: '',//对外跳点规则
                        condition_rules_n: '',//对内跳点规则
                    }]
                })
            },
            //删除佣金方案中 跳点条件
            delJump(item, ind) {
               item.condition.splice(ind, 1);
            },
            //添加佣金方案中 跳点条件
            addJump(item) {
                item.condition.push({ start_condition: '', end_condition: '', condition_rules: '', condition_rules_n: '', });
            },
            
            // 打开数组中的弹窗
            open(item, num) {
                this.obj = item
                if (num == 6) {
                    this.show_6 = true
                } else if (num == 7) {
                    this.show_7 = true
                } else if (num == 8) {
                    this.show_9 = true
                } else if (num == 9) {
                    this.show_10 = true
                } else if (num == 10) {
                    this.show_11 = true
                } else if (num == 11) {
                    this.show_12 = true
                } else if (num == 12) {
                    this.show_13 = true
                } else if (num == 13) {
                    this.show_14 = true
                }
            },
            // 选择标签
            choose(item) {
                item.isSelect = !item.isSelect
            },
            confirmStore() {
                var a = [], b = []
                if (this.screen.label && this.screen.label.length > 0) {
                    this.screen.label.forEach(cur => {
                        if (cur.isSelect) {
                            a.push(cur.name)
                            b.push(cur.id)
                        }
                    })
                }
                this.label = a.join(',')
                this.labelId = b.join(',')
                this.show_4 = false
            },
            
            // 上传视频
            chooseVideo(num, item) {
                uni.chooseVideo({
                    count: 1, //默认9
                    sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图，默认二者都有
                    sourceType: ['album', 'camera'], // 相机拍照 album 相册、camera 拍照
                    success: (res) => {
                        console.log(res)
                        uni.showLoading({title:'上传中...'})
                        uni.uploadFile({
                            url: this.URL + 'api/upload_image', //仅为示例，并非真实接口地址。
                            filePath: res.tempFilePath,
                            name: 'image',
                            formData:{module: 'api'},
                            success: result => {
                                console.log('result',result)
                                let data = JSON.parse(result.data).detail; //后台返回的路径data.attach_uri
                                if (num == 6) {
                                    // 基本信息--视频
                                    this.video = data.image
                                    this.videoId = data.image_id
                                } else if (num == 8) {
                                    // 户型--视频
                                    item.video = data.image
                                    item.video_id = data.image_id
                                }
                                uni.hideLoading()
                            }
                        });
                    }
                });
            },
            
            // 上传图片
            chooseImg(num, item) {
                uni.chooseImage({
                    count: 9, //默认9
                    sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图，默认二者都有
                    sourceType: ['album', 'camera'], // 相机拍照 album 相册、camera 拍照
                    success: (res) => {
                        const tempFilePaths = res.tempFilePaths;
                        for (let i = 0; i < tempFilePaths.length; i++) {
                            uni.uploadFile({
                                url: this.URL + 'api/upload_image', //仅为示例，并非真实接口地址。
                                filePath: res.tempFilePaths[i],
                                name: 'image',
                                formData:{module: 'api'},
                                success: result => {
                                    console.log(result)
                                    let data = JSON.parse(result.data).detail; //后台返回的路径data.attach_uri
                                    if (num == 1) {
                                        this.cover = data.image
                                        this.coverId = data.image_id
                                    } else if (num == 2) {
                                        this.imgs.push(data.image);
                                        this.imgsId.push(data.image_id);
                                    } else if (num == 3) {
                                        item.image = data.image
                                        item.image_id = data.image_id
                                    } else if (num == 4) {
                                        item.hImgs.push(data.image);
                                        item.hImgsId.push(data.image_id);
                                    } else if (num == 5) {
                                        // 基本信息--样板间
                                        this.rooms.push(data.image);
                                        this.roomsId.push(data.image_id);
                                    } else if (num == 7) {
                                        // 户型--样板间图
                                        item.hRoomImgs.push(data.image);
                                        item.hRoomImgsId.push(data.image_id);
                                    } 
                                }
                            });
                        }
                    }
                });
            },
            // 预览图片
            doPreview(item, index) {
            	var arr = [];
            	arr.push(item);
            	uni.previewImage({
            	    urls: arr,
                    current: index,
            	    longPressActions: {
            	        success: function(data) {
            	        },
            	        fail: function(err) {
                            console.log(err)
            	        }
            	    }
            	});
            },
            //删除
            delImg(index, num, item) {
                uni.showModal({
                    title: '提示',
                    content: '确定要删除吗？',
                    success: res => {
                        if (res.confirm) {
                            if (num == 1) {
                                this.imgsId.splice(index, 1);
                                this.imgs.splice(index, 1);
                            } else if (num == 2) {
                                item.hImgsId.splice(index, 1);
                                item.hImgs.splice(index, 1);
                            } else if (num == 11) {
                                this.cover = ''
                                this.coverId = ''
                            } else if (num == 22) {
                                item.image = ''
                                item.image_id = ''
                            } else if (num == 5) {
                                // 基本信息--样板间
                                this.roomsId.splice(index, 1);
                                this.rooms.splice(index, 1);
                            } else if (num == 66) {
                                // 基本信息--视频
                                this.video = ''
                                this.videoId = ''
                            } else if (num == 7) {
                                // 户型--样板间图
                                this.hRoomImgsId.splice(index, 1);
                                this.hRoomImgs.splice(index, 1);
                            } else if (num == 88) {
                                // 户型--视频
                                item.video = ''
                                item.video_id = ''
                            }
                        } else if (res.cancel) {
                            
                        }
                    }
                });
            },
            
            //选择时间
            chooseTime(num, e) {
            	if (num == 1) {
                    this.startTime = e.year + '-' + e.month + '-' + e.day;
            	}
                if (num == 2) {
                    this.endTime = e.year + '-' + e.month + '-' + e.day;
            	}
                if (num == 3) {
                    this.obj.start_time = e.year + '-' + e.month + '-' + e.day;
                }
                if (num == 4) {
                    this.obj.end_time = e.year + '-' + e.month + '-' + e.day;
                }
            },
            
            // 获取筛选项
            getScreen() {
                this.$ajax('properties_screen', {
                    // user_token: this.$getSync('userToken'),
                    // type: 1,//1筛选加不限
                }).then(ret => {
                    if (ret.success == 1000) {
                        this.screen = ret.detail
                        if (this.screen && this.screen.label && this.screen.label.length > 0) {
                            this.screen.label.forEach(cur => {
                                this.$set(cur, 'isSelect', false)
                            })
                        }
                    } else {
                        this.$toast(ret.msg);
                    }
                });
            },
        }
    };
</script>

<style lang="scss">
    .jump-box{
        padding: 30rpx 0 10rpx;
        border-bottom: 2rpx solid #e6e6e6;
    }
    .jump-title{
        font-weight: bold;
        padding: 0 10rpx 30rpx;
    }
    .jump-item{
        padding: 0 15rpx;
        background-color: #f5f5f5;
        border-radius: 15rpx;
    }
    
    .jump-btns{
        display: flex;
        justify-content: flex-end;
        align-items: center;
        padding: 20rpx 0;
    }
    .jump-btn-l{
        color: #fff;
        font-size: 28rpx;
        line-height: 1;
        background-color: #f0bf36;
        padding: 13rpx 25rpx;
        border-radius: 50rpx;
    }
    .jump-btn-l>text{
        font-weight: bold;
        padding-right: 5rpx;
    }
    .jump-btn-r{
        margin-left: 25rpx;
    }
    
    
    
    
    
    .img-box{
        padding-top: 20rpx;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-items: center;
    }
    .up-photo{
        width: 168rpx;
        height: 168rpx;
        margin-right: 15rpx;
        margin-bottom: 15rpx;
    }
    .video-box-item{
        display: flex;
        justify-content: flex-start;
        align-items: flex-end;
    }
    .del-video{
        font-size: 24rpx;
        color: #fff;
        padding: 5rpx 8rpx;
        background: rgba(0,0,0, .5);
    }
    .img-box-item{
        position: relative;
    }
    .del-img{
        font-size: 24rpx;
        color: #fff;
        padding: 5rpx 8rpx;
        background: rgba(0,0,0, .5);
        position: absolute;
        right: 15rpx;
        bottom: 15rpx;
    }
    .up-img{
        width: 168rpx;
        height: 168rpx;
        margin-right: 15rpx;
        margin-bottom: 15rpx;
    }
    
    .popup{
        padding: 24rpx;
    }
    .popup-item{
        padding: 20rpx 0;
        text-align: center;
    }
    .active{
        font-weight: bold;
        color: #00a1e9;
    }
    .pop-btn{
        color: #fff;
        background-color: #00a1e9;
        padding: 20rpx;
        text-align: center;
        margin: 20rpx;
        border-radius: 50rpx;
    }
    
    .pay-type{
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .choose-02{
        width: 31rpx;
        height: 31rpx;
        margin-right: 10rpx;
    }
    .inp-jm{
        background-color: #fafafa;
        width: 200rpx;
        height: 80rpx;
        margin: 10rpx 20rpx;
        text-align: center;
    }
    .inp-td{
        background-color: #fff;
        width: 150rpx;
        height: 80rpx;
        margin: 10rpx 20rpx;
        text-align: center;
    }
    .inp-td-rule{
        flex: 1;
        // width: 440rpx;
        height: 100rpx;
        text-align: right;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    
    
    page{
        background-color: #f5f5f5;
    }
    .content{
        padding: 20rpx;
    }
    .box{
        background-color: #fff;
        margin-bottom: 20rpx;
        border-radius: 20rpx;
    }
    .title{
        background-color: #effaff;
        padding: 25rpx;
        border-radius: 20rpx 20rpx 0 0;
        color: #00a1e9;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .add{
        color: #fff;
        font-size: 28rpx;
        line-height: 1;
        background-color: #00a1e9;
        padding: 13rpx 25rpx;
        border-radius: 50rpx;
    }
    .add>text{
        font-weight: bold;
        padding-right: 5rpx;
    }
    .border-t{
        border-top: 2rpx solid #e6e6e6;
    }
    .box-down{
        padding: 0 20rpx;
    }
    .box-cen{
        padding: 0 20rpx;
    }
    .info{
        display: flex;
        justify-content: flex-start;
        align-items: center;
        padding-bottom: 10rpx;
    }
    .info-name{
        font-size: 32rpx;
        font-weight: bold;
    }
    .arrow-d-01{
        width: 16rpx;
        height: 11rpx;
    }
    .del-icon{
        width: 25rpx;
        height: 26rpx;
        margin-left: 30rpx;
    }
    .ke-inp{
        font-size: 26rpx;
        background-color: #f5f5f5;
        padding: 20rpx;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 20rpx;
    }
    .tip{
        display: flex;
        justify-content: flex-start;
        align-items: center;
        font-size: 24rpx;
        color: #45474c;
        padding-top: 20rpx;
    }
    .tip-icon{
        width: 25rpx;
        height: 25rpx;
        margin-right: 10rpx;
    }
    .ke-inp-item{
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 2rpx solid #e6e6e6;
    }
    .ke-inp-item:last-child{
        border-bottom: none;
    }
    .ke-inp-item2{
        border-bottom: 2rpx solid #e6e6e6;
    }
    .p-inp{
        color: #acacac;
    }
    .inp{
        // width: 470rpx;
        flex: 1;
        height: 100rpx;
        text-align: right;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding-left: 10rpx;
    }
    
    .f-inp{
        width: 110rpx;
        height: 70rpx;
        background-color: #fafafa;
        text-align: center;
        margin: 20rpx 10rpx;
    }
    .add-icon{
        width: 152rpx;
        height: 56rpx;
        margin-top: 15rpx;
    }
    .remark{
        padding: 30rpx 0;
        // border-top: 2rpx solid #e6e6e6;
    }
    .rule-text{
        width: 100%;
        padding: 20rpx;
        background-color: #fafafa;
        line-height: 2;
    }
    .tit-t{
        min-height: 100rpx;
    }
    
    
    .btn{
        font-size: 34rpx;
        color: #fff;
        text-align: center;
        padding: 25rpx;
        background-color: #00a1e9;
        border-radius: 50rpx;
        margin-top: 50rpx;
    }
    
    .item{
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-bottom: 45rpx;
    }
    .del-09{
        width: 213rpx;
        height: 158rpx;
        border-radius: 10rpx;
        margin-right: 15rpx;
    }
    .name{
        font-size: 32rpx;
        font-weight: bold;
        width: 380rpx;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .area{
        padding: 15rpx 0;
        font-size: 24rpx;
        width: 380rpx;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .baobei{
        padding: 15rpx;
        font-size: 27rpx;
        line-height: 1;
        color: #803906;
        background-color: #ffecd2;
        border-radius: 15rpx;
    }
    .price{
        font-size: 24rpx;
        display: flex;
        justify-content: flex-start;
        align-items: center;
    }
    .p-l{
        color: #fe3c3c;
        font-size: 36rpx;
        font-weight: bold;
    }
    .p-l-r{
        color: #fe3c3c;
        padding: 0 5rpx;
    }
    .plan{
        color: #5f8fbe;
        font-size: 23rpx;
        line-height: 1;
        padding: 4rpx 13rpx;
        border: 2rpx solid #5f8fbe;
        border-radius: 5rpx;
        margin-left: 12rpx;
    }
    
    
</style>
